#pragma once

#include "ClientConnection.h"

namespace network {

    class TcpClient : public ClientConnection {

    public:

        TcpClient() { initHandler(); }

        explicit TcpClient(Reactor *reactor) : ClientConnection(Socket::createSocket(), false, reactor) {
            initHandler();
        }

    private:

        // 初始化注册到Reactor模型上
        void initHandler();

        // 客户端回调
        void clientHandler(int, EventType, void *);

    };

}
